﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PServiceBus.Core.Runtime.Topics {
    /// <summary>
    /// Defines parameter construct for a topic contract
    /// </summary>
    [Serializable]
    public struct TopicParameterInfo {
        /// <summary>
        /// Gets or sets the name of the parameter
        /// </summary>
        /// <value>The name.</value>
        public string Name { get; set; }
        /// <summary>
        /// Gets or sets the description of the parameter.
        /// Should be descriptive and explain what parameter is used for
        /// </summary>
        /// <value>The description.</value>
        public string Description { get; set; }
        /// <summary>
        /// Create a new instance of a parameter for a contract
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="description">The description.</param>
        /// <returns></returns>
        public static TopicParameterInfo New(string name, string description) {
            return new TopicParameterInfo() { Name = name, Description = description };
        }
    }
}
